﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Elderos.Utils.SQL
{
    public static class SqlUtils
    {
        public static T GetField<T>(this IDataReader reader, string field)
        {
            var value = reader[field];
            return value == DBNull.Value ? default(T) : (T)value;
        }
    }
}
